﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace GGSharp.Radio.XML
{
    public class ChannelServer
    {
        private string _address;
        private short _port;
        private short _sslPort;

        public ChannelServer(XmlReader reader)
        {
            _address = reader.GetAttribute("ip");
            Int16.TryParse(reader.GetAttribute("port"), out _port);
            Int16.TryParse(reader.GetAttribute("authport"), out _sslPort);

            while (reader.Read() && reader.NodeType != XmlNodeType.EndElement) { }
        }

        public string Address
        {
            get { return _address; }
            set { _address = value; }
        }

        public short Port
        {
            get { return _port; }
            set { _port = value; }
        }

        public short SslPort
        {
            get { return _sslPort; }
            set { _sslPort = value; }
        }

    }
}
